<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>is_disposition</title>
<link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../boost_asio.html" title="Boost.Asio">
<link rel="up" href="../reference.html" title="Reference">
<link rel="prev" href="is_deferred.html" title="is_deferred">
<link rel="next" href="is_dynamic_buffer.html" title="is_dynamic_buffer">
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td>
<td align="center"><a href="../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="is_deferred.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../boost_asio.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="is_dynamic_buffer.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="section">
<div class="titlepage"><div><div><h3 class="title">
<a name="boost_asio.reference.is_disposition"></a><a class="link" href="is_disposition.html" title="is_disposition">is_disposition</a>
</h3></div></div></div>
<p>
        <a class="indexterm" name="boost_asio.indexterm.is_disposition"></a>
      </p>
<p>
        Trait used for testing whether a type satisfies the requirements of a disposition.
      </p>
<pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span>
    <span class="keyword">typename</span> <span class="identifier">T</span><span class="special">&gt;</span>
<span class="keyword">struct</span> <span class="identifier">is_disposition</span> <span class="special">:</span>
  <span class="keyword">public</span> <span class="identifier">integral_constant</span><span class="special">&lt;</span> <span class="keyword">bool</span><span class="special">,</span> <span class="identifier">automatically_determined</span> <span class="special">&gt;</span>
</pre>
<p>
        To be a valid disposition, a type must be nothrow default-constructible,
        nothrow move-constructible, nothrow move-assignable, and there must be a
        specialisation of the <a class="link" href="disposition_traits.html" title="disposition_traits"><code class="computeroutput"><span class="identifier">disposition_traits</span></code></a> template for
        the type that provides the following static member functions: * <code class="computeroutput"><span class="identifier">not_an_error</span><span class="special">:</span></code>
        Takes an argument of type <code class="computeroutput"><span class="keyword">const</span> <span class="identifier">T</span><span class="special">&amp;</span></code>
        and returns a <code class="computeroutput"><span class="keyword">bool</span></code>.
      </p>
<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
<li class="listitem">
            <code class="computeroutput"><span class="identifier">throw_exception</span><span class="special">:</span></code>
            Takes an argument of type <code class="computeroutput"><span class="identifier">T</span></code>.
            The caller of this function must not pass a disposition value for which
            <code class="computeroutput"><span class="identifier">not_an_error</span></code> returns
            true. This function must not return.
          </li>
<li class="listitem">
            <code class="computeroutput"><span class="identifier">to_exception_ptr</span><span class="special">:</span></code>
            Takes an argument of type <code class="computeroutput"><span class="identifier">T</span></code>
            and returns a value of type <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">exception_ptr</span></code>.
          </li>
</ul></div>
<h5>
<a name="boost_asio.reference.is_disposition.h0"></a>
        <span class="phrase"><a name="boost_asio.reference.is_disposition.requirements"></a></span><a class="link" href="is_disposition.html#boost_asio.reference.is_disposition.requirements">Requirements</a>
      </h5>
<p>
        <span class="emphasis"><em>Header: </em></span><code class="literal">boost/asio/disposition.hpp</code>
      </p>
<p>
        <span class="emphasis"><em>Convenience header: </em></span><code class="literal">boost/asio.hpp</code>
      </p>
</div>
<div class="copyright-footer">Copyright © 2003-2025 Christopher M.
      Kohlhoff<p>
        Distributed under the Boost Software License, Version 1.0. (See accompanying
        file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
      </p>
</div>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="is_deferred.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../boost_asio.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="is_dynamic_buffer.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
